/*
 * << Haru Free PDF Library >> -- hpdf_encoder_utf.c
 *
 * URL: http://libharu.org
 *
 * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
 * Copyright (c) 2007-2008 Antony Dovgal <tony@daylessday.org>
 * Copyright (c) 2010      Sergey Konovalov <webmaster@crynet.ru>
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.
 * It is provided "as is" without express or implied warranty.
 *
 */

#include "hpdf_conf.h"
#include "hpdf_utils.h"
#include "hpdf_encoder.h"
#include "hpdf.h"

static const HPDF_UnicodeMap_Rec UTF8_UNICODE_ARRAY[] = {
    {0x0000, 0x0000},
    {0x0001, 0x0001},
    {0x0002, 0x0002},
    {0x0003, 0x0003},
    {0x0004, 0x0004},
    {0x0005, 0x0005},
    {0x0006, 0x0006},
    {0x0007, 0x0007},
    {0x0008, 0x0008},
    {0x0009, 0x0009},
    {0x000A, 0x000A},
    {0x000B, 0x000B},
    {0x000C, 0x000C},
    {0x000D, 0x000D},
    {0x000E, 0x000E},
    {0x000F, 0x000F},
    {0x0010, 0x0010},
    {0x0011, 0x0011},
    {0x0012, 0x0012},
    {0x0013, 0x0013},
    {0x0014, 0x0014},
    {0x0015, 0x0015},
    {0x0016, 0x0016},
    {0x0017, 0x0017},
    {0x0018, 0x0018},
    {0x0019, 0x0019},
    {0x001A, 0x001A},
    {0x001B, 0x001B},
    {0x001C, 0x001C},
    {0x001D, 0x001D},
    {0x001E, 0x001E},
    {0x001F, 0x001F},
    {0x0020, 0x0020},
    {0x0021, 0x0021},
    {0x0022, 0x0022},
    {0x0023, 0x0023},
    {0x0024, 0x0024},
    {0x0025, 0x0025},
    {0x0026, 0x0026},
    {0x0027, 0x0027},
    {0x0028, 0x0028},
    {0x0029, 0x0029},
    {0x002A, 0x002A},
    {0x002B, 0x002B},
    {0x002C, 0x002C},
    {0x002D, 0x002D},
    {0x002E, 0x002E},
    {0x002F, 0x002F},
    {0x0030, 0x0030},
    {0x0031, 0x0031},
    {0x0032, 0x0032},
    {0x0033, 0x0033},
    {0x0034, 0x0034},
    {0x0035, 0x0035},
    {0x0036, 0x0036},
    {0x0037, 0x0037},
    {0x0038, 0x0038},
    {0x0039, 0x0039},
    {0x003A, 0x003A},
    {0x003B, 0x003B},
    {0x003C, 0x003C},
    {0x003D, 0x003D},
    {0x003E, 0x003E},
    {0x003F, 0x003F},
    {0x0040, 0x0040},
    {0x0041, 0x0041},
    {0x0042, 0x0042},
    {0x0043, 0x0043},
    {0x0044, 0x0044},
    {0x0045, 0x0045},
    {0x0046, 0x0046},
    {0x0047, 0x0047},
    {0x0048, 0x0048},
    {0x0049, 0x0049},
    {0x004A, 0x004A},
    {0x004B, 0x004B},
    {0x004C, 0x004C},
    {0x004D, 0x004D},
    {0x004E, 0x004E},
    {0x004F, 0x004F},
    {0x0050, 0x0050},
    {0x0051, 0x0051},
    {0x0052, 0x0052},
    {0x0053, 0x0053},
    {0x0054, 0x0054},
    {0x0055, 0x0055},
    {0x0056, 0x0056},
    {0x0057, 0x0057},
    {0x0058, 0x0058},
    {0x0059, 0x0059},
    {0x005A, 0x005A},
    {0x005B, 0x005B},
    {0x005C, 0x005C},
    {0x005D, 0x005D},
    {0x005E, 0x005E},
    {0x005F, 0x005F},
    {0x0060, 0x0060},
    {0x0061, 0x0061},
    {0x0062, 0x0062},
    {0x0063, 0x0063},
    {0x0064, 0x0064},
    {0x0065, 0x0065},
    {0x0066, 0x0066},
    {0x0067, 0x0067},
    {0x0068, 0x0068},
    {0x0069, 0x0069},
    {0x006A, 0x006A},
    {0x006B, 0x006B},
    {0x006C, 0x006C},
    {0x006D, 0x006D},
    {0x006E, 0x006E},
    {0x006F, 0x006F},
    {0x0070, 0x0070},
    {0x0071, 0x0071},
    {0x0072, 0x0072},
    {0x0073, 0x0073},
    {0x0074, 0x0074},
    {0x0075, 0x0075},
    {0x0076, 0x0076},
    {0x0077, 0x0077},
    {0x0078, 0x0078},
    {0x0079, 0x0079},
    {0x007A, 0x007A},
    {0x007B, 0x007B},
    {0x007C, 0x007C},
    {0x007D, 0x007D},
    {0x007E, 0x007E},
    {0x007F, 0x007F},
    {0xC280, 0x0080},
    {0xC281, 0x0081},
    {0xC282, 0x0082},
    {0xC283, 0x0083},
    {0xC284, 0x0084},
    {0xC285, 0x0085},
    {0xC286, 0x0086},
    {0xC287, 0x0087},
    {0xC288, 0x0088},
    {0xC289, 0x0089},
    {0xC28A, 0x008A},
    {0xC28B, 0x008B},
    {0xC28C, 0x008C},
    {0xC28D, 0x008D},
    {0xC28E, 0x008E},
    {0xC28F, 0x008F},
    {0xC290, 0x0090},
    {0xC291, 0x0091},
    {0xC292, 0x0092},
    {0xC293, 0x0093},
    {0xC294, 0x0094},
    {0xC295, 0x0095},
    {0xC296, 0x0096},
    {0xC297, 0x0097},
    {0xC298, 0x0098},
    {0xC299, 0x0099},
    {0xC29A, 0x009A},
    {0xC29B, 0x009B},
    {0xC29C, 0x009C},
    {0xC29D, 0x009D},
    {0xC29E, 0x009E},
    {0xC29F, 0x009F},
    {0xC2A0, 0x00A0},
    {0xC2A1, 0x00A1},
    {0xC2A2, 0x00A2},
    {0xC2A3, 0x00A3},
    {0xC2A4, 0x00A4},
    {0xC2A5, 0x00A5},
    {0xC2A6, 0x00A6},
    {0xC2A7, 0x00A7},
    {0xC2A8, 0x00A8},
    {0xC2A9, 0x00A9},
    {0xC2AA, 0x00AA},
    {0xC2AB, 0x00AB},
    {0xC2AC, 0x00AC},
    {0xC2AD, 0x00AD},
    {0xC2AE, 0x00AE},
    {0xC2AF, 0x00AF},
    {0xC2B0, 0x00B0},
    {0xC2B1, 0x00B1},
    {0xC2B2, 0x00B2},
    {0xC2B3, 0x00B3},
    {0xC2B4, 0x00B4},
    {0xC2B5, 0x00B5},
    {0xC2B6, 0x00B6},
    {0xC2B7, 0x00B7},
    {0xC2B8, 0x00B8},
    {0xC2B9, 0x00B9},
    {0xC2BA, 0x00BA},
    {0xC2BB, 0x00BB},
    {0xC2BC, 0x00BC},
    {0xC2BD, 0x00BD},
    {0xC2BE, 0x00BE},
    {0xC2BF, 0x00BF},
    {0xC380, 0x00C0},
    {0xC381, 0x00C1},
    {0xC382, 0x00C2},
    {0xC383, 0x00C3},
    {0xC384, 0x00C4},
    {0xC385, 0x00C5},
    {0xC386, 0x00C6},
    {0xC387, 0x00C7},
    {0xC388, 0x00C8},
    {0xC389, 0x00C9},
    {0xC38A, 0x00CA},
    {0xC38B, 0x00CB},
    {0xC38C, 0x00CC},
    {0xC38D, 0x00CD},
    {0xC38E, 0x00CE},
    {0xC38F, 0x00CF},
    {0xC390, 0x00D0},
    {0xC391, 0x00D1},
    {0xC392, 0x00D2},
    {0xC393, 0x00D3},
    {0xC394, 0x00D4},
    {0xC395, 0x00D5},
    {0xC396, 0x00D6},
    {0xC397, 0x00D7},
    {0xC398, 0x00D8},
    {0xC399, 0x00D9},
    {0xC39A, 0x00DA},
    {0xC39B, 0x00DB},
    {0xC39C, 0x00DC},
    {0xC39D, 0x00DD},
    {0xC39E, 0x00DE},
    {0xC39F, 0x00DF},
    {0xC3A0, 0x00E0},
    {0xC3A1, 0x00E1},
    {0xC3A2, 0x00E2},
    {0xC3A3, 0x00E3},
    {0xC3A4, 0x00E4},
    {0xC3A5, 0x00E5},
    {0xC3A6, 0x00E6},
    {0xC3A7, 0x00E7},
    {0xC3A8, 0x00E8},
    {0xC3A9, 0x00E9},
    {0xC3AA, 0x00EA},
    {0xC3AB, 0x00EB},
    {0xC3AC, 0x00EC},
    {0xC3AD, 0x00ED},
    {0xC3AE, 0x00EE},
    {0xC3AF, 0x00EF},
    {0xC3B0, 0x00F0},
    {0xC3B1, 0x00F1},
    {0xC3B2, 0x00F2},
    {0xC3B3, 0x00F3},
    {0xC3B4, 0x00F4},
    {0xC3B5, 0x00F5},
    {0xC3B6, 0x00F6},
    {0xC3B7, 0x00F7},
    {0xC3B8, 0x00F8},
    {0xC3B9, 0x00F9},
    {0xC3BA, 0x00FA},
    {0xC3BB, 0x00FB},
    {0xC3BC, 0x00FC},
    {0xC3BD, 0x00FD},
    {0xC3BE, 0x00FE},
    {0xC3BF, 0x00FF},
    {0xC480, 0x0100},
    {0xC481, 0x0101},
    {0xC482, 0x0102},
    {0xC483, 0x0103},
    {0xC484, 0x0104},
    {0xC485, 0x0105},
    {0xC486, 0x0106},
    {0xC487, 0x0107},
    {0xC488, 0x0108},
    {0xC489, 0x0109},
    {0xC48A, 0x010A},
    {0xC48B, 0x010B},
    {0xC48C, 0x010C},
    {0xC48D, 0x010D},
    {0xC48E, 0x010E},
    {0xC48F, 0x010F},
    {0xC490, 0x0110},
    {0xC491, 0x0111},
    {0xC492, 0x0112},
    {0xC493, 0x0113},
    {0xC494, 0x0114},
    {0xC495, 0x0115},
    {0xC496, 0x0116},
    {0xC497, 0x0117},
    {0xC498, 0x0118},
    {0xC499, 0x0119},
    {0xC49A, 0x011A},
    {0xC49B, 0x011B},
    {0xC49C, 0x011C},
    {0xC49D, 0x011D},
    {0xC49E, 0x011E},
    {0xC49F, 0x011F},
    {0xC4A0, 0x0120},
    {0xC4A1, 0x0121},
    {0xC4A2, 0x0122},
    {0xC4A3, 0x0123},
    {0xC4A4, 0x0124},
    {0xC4A5, 0x0125},
    {0xC4A6, 0x0126},
    {0xC4A7, 0x0127},
    {0xC4A8, 0x0128},
    {0xC4A9, 0x0129},
    {0xC4AA, 0x012A},
    {0xC4AB, 0x012B},
    {0xC4AC, 0x012C},
    {0xC4AD, 0x012D},
    {0xC4AE, 0x012E},
    {0xC4AF, 0x012F},
    {0xC4B0, 0x0130},
    {0xC4B1, 0x0131},
    {0xC4B2, 0x0132},
    {0xC4B3, 0x0133},
    {0xC4B4, 0x0134},
    {0xC4B5, 0x0135},
    {0xC4B6, 0x0136},
    {0xC4B7, 0x0137},
    {0xC4B8, 0x0138},
    {0xC4B9, 0x0139},
    {0xC4BA, 0x013A},
    {0xC4BB, 0x013B},
    {0xC4BC, 0x013C},
    {0xC4BD, 0x013D},
    {0xC4BE, 0x013E},
    {0xC4BF, 0x013F},
    {0xC580, 0x0140},
    {0xC581, 0x0141},
    {0xC582, 0x0142},
    {0xC583, 0x0143},
    {0xC584, 0x0144},
    {0xC585, 0x0145},
    {0xC586, 0x0146},
    {0xC587, 0x0147},
    {0xC588, 0x0148},
    {0xC589, 0x0149},
    {0xC58A, 0x014A},
    {0xC58B, 0x014B},
    {0xC58C, 0x014C},
    {0xC58D, 0x014D},
    {0xC58E, 0x014E},
    {0xC58F, 0x014F},
    {0xC590, 0x0150},
    {0xC591, 0x0151},
    {0xC592, 0x0152},
    {0xC593, 0x0153},
    {0xC594, 0x0154},
    {0xC595, 0x0155},
    {0xC596, 0x0156},
    {0xC597, 0x0157},
    {0xC598, 0x0158},
    {0xC599, 0x0159},
    {0xC59A, 0x015A},
    {0xC59B, 0x015B},
    {0xC59C, 0x015C},
    {0xC59D, 0x015D},
    {0xC59E, 0x015E},
    {0xC59F, 0x015F},
    {0xC5A0, 0x0160},
    {0xC5A1, 0x0161},
    {0xC5A2, 0x0162},
    {0xC5A3, 0x0163},
    {0xC5A4, 0x0164},
    {0xC5A5, 0x0165},
    {0xC5A6, 0x0166},
    {0xC5A7, 0x0167},
    {0xC5A8, 0x0168},
    {0xC5A9, 0x0169},
    {0xC5AA, 0x016A},
    {0xC5AB, 0x016B},
    {0xC5AC, 0x016C},
    {0xC5AD, 0x016D},
    {0xC5AE, 0x016E},
    {0xC5AF, 0x016F},
    {0xC5B0, 0x0170},
    {0xC5B1, 0x0171},
    {0xC5B2, 0x0172},
    {0xC5B3, 0x0173},
    {0xC5B4, 0x0174},
    {0xC5B5, 0x0175},
    {0xC5B6, 0x0176},
    {0xC5B7, 0x0177},
    {0xC5B8, 0x0178},
    {0xC5B9, 0x0179},
    {0xC5BA, 0x017A},
    {0xC5BB, 0x017B},
    {0xC5BC, 0x017C},
    {0xC5BD, 0x017D},
    {0xC5BE, 0x017E},
    {0xC5BF, 0x017F},
    {0xC680, 0x0180},
    {0xC681, 0x0181},
    {0xC682, 0x0182},
    {0xC683, 0x0183},
    {0xC684, 0x0184},
    {0xC685, 0x0185},
    {0xC686, 0x0186},
    {0xC687, 0x0187},
    {0xC688, 0x0188},
    {0xC689, 0x0189},
    {0xC68A, 0x018A},
    {0xC68B, 0x018B},
    {0xC68C, 0x018C},
    {0xC68D, 0x018D},
    {0xC68E, 0x018E},
    {0xC68F, 0x018F},
    {0xC690, 0x0190},
    {0xC691, 0x0191},
    {0xC692, 0x0192},
    {0xC693, 0x0193},
    {0xC694, 0x0194},
    {0xC695, 0x0195},
    {0xC696, 0x0196},
    {0xC697, 0x0197},
    {0xC698, 0x0198},
    {0xC699, 0x0199},
    {0xC69A, 0x019A},
    {0xC69B, 0x019B},
    {0xC69C, 0x019C},
    {0xC69D, 0x019D},
    {0xC69E, 0x019E},
    {0xC69F, 0x019F},
    {0xC6A0, 0x01A0},
    {0xC6A1, 0x01A1},
    {0xC6A2, 0x01A2},
    {0xC6A3, 0x01A3},
    {0xC6A4, 0x01A4},
    {0xC6A5, 0x01A5},
    {0xC6A6, 0x01A6},
    {0xC6A7, 0x01A7},
    {0xC6A8, 0x01A8},
    {0xC6A9, 0x01A9},
    {0xC6AA, 0x01AA},
    {0xC6AB, 0x01AB},
    {0xC6AC, 0x01AC},
    {0xC6AD, 0x01AD},
    {0xC6AE, 0x01AE},
    {0xC6AF, 0x01AF},
    {0xC6B0, 0x01B0},
    {0xC6B1, 0x01B1},
    {0xC6B2, 0x01B2},
    {0xC6B3, 0x01B3},
    {0xC6B4, 0x01B4},
    {0xC6B5, 0x01B5},
    {0xC6B6, 0x01B6},
    {0xC6B7, 0x01B7},
    {0xC6B8, 0x01B8},
    {0xC6B9, 0x01B9},
    {0xC6BA, 0x01BA},
    {0xC6BB, 0x01BB},
    {0xC6BC, 0x01BC},
    {0xC6BD, 0x01BD},
    {0xC6BE, 0x01BE},
    {0xC6BF, 0x01BF},
    {0xC780, 0x01C0},
    {0xC781, 0x01C1},
    {0xC782, 0x01C2},
    {0xC783, 0x01C3},
    {0xC784, 0x01C4},
    {0xC785, 0x01C5},
    {0xC786, 0x01C6},
    {0xC787, 0x01C7},
    {0xC788, 0x01C8},
    {0xC789, 0x01C9},
    {0xC78A, 0x01CA},
    {0xC78B, 0x01CB},
    {0xC78C, 0x01CC},
    {0xC78D, 0x01CD},
    {0xC78E, 0x01CE},
    {0xC78F, 0x01CF},
    {0xC790, 0x01D0},
    {0xC791, 0x01D1},
    {0xC792, 0x01D2},
    {0xC793, 0x01D3},
    {0xC794, 0x01D4},
    {0xC795, 0x01D5},
    {0xC796, 0x01D6},
    {0xC797, 0x01D7},
    {0xC798, 0x01D8},
    {0xC799, 0x01D9},
    {0xC79A, 0x01DA},
    {0xC79B, 0x01DB},
    {0xC79C, 0x01DC},
    {0xC79D, 0x01DD},
    {0xC79E, 0x01DE},
    {0xC79F, 0x01DF},
    {0xC7A0, 0x01E0},
    {0xC7A1, 0x01E1},
    {0xC7A2, 0x01E2},
    {0xC7A3, 0x01E3},
    {0xC7A4, 0x01E4},
    {0xC7A5, 0x01E5},
    {0xC7A6, 0x01E6},
    {0xC7A7, 0x01E7},
    {0xC7A8, 0x01E8},
    {0xC7A9, 0x01E9},
    {0xC7AA, 0x01EA},
    {0xC7AB, 0x01EB},
    {0xC7AC, 0x01EC},
    {0xC7AD, 0x01ED},
    {0xC7AE, 0x01EE},
    {0xC7AF, 0x01EF},
    {0xC7B0, 0x01F0},
    {0xC7B1, 0x01F1},
    {0xC7B2, 0x01F2},
    {0xC7B3, 0x01F3},
    {0xC7B4, 0x01F4},
    {0xC7B5, 0x01F5},
    {0xC7B6, 0x01F6},
    {0xC7B7, 0x01F7},
    {0xC7B8, 0x01F8},
    {0xC7B9, 0x01F9},
    {0xC7BA, 0x01FA},
    {0xC7BB, 0x01FB},
    {0xC7BC, 0x01FC},
    {0xC7BD, 0x01FD},
    {0xC7BE, 0x01FE},
    {0xC7BF, 0x01FF},
    {0xC880, 0x0200},
    {0xC881, 0x0201},
    {0xC882, 0x0202},
    {0xC883, 0x0203},
    {0xC884, 0x0204},
    {0xC885, 0x0205},
    {0xC886, 0x0206},
    {0xC887, 0x0207},
    {0xC888, 0x0208},
    {0xC889, 0x0209},
    {0xC88A, 0x020A},
    {0xC88B, 0x020B},
    {0xC88C, 0x020C},
    {0xC88D, 0x020D},
    {0xC88E, 0x020E},
    {0xC88F, 0x020F},
    {0xC890, 0x0210},
    {0xC891, 0x0211},
    {0xC892, 0x0212},
    {0xC893, 0x0213},
    {0xC894, 0x0214},
    {0xC895, 0x0215},
    {0xC896, 0x0216},
    {0xC897, 0x0217},
    {0xC898, 0x0218},
    {0xC899, 0x0219},
    {0xC89A, 0x021A},
    {0xC89B, 0x021B},
    {0xC89C, 0x021C},
    {0xC89D, 0x021D},
    {0xC89E, 0x021E},
    {0xC89F, 0x021F},
    {0xC8A0, 0x0220},
    {0xC8A1, 0x0221},
    {0xC8A2, 0x0222},
    {0xC8A3, 0x0223},
    {0xC8A4, 0x0224},
    {0xC8A5, 0x0225},
    {0xC8A6, 0x0226},
    {0xC8A7, 0x0227},
    {0xC8A8, 0x0228},
    {0xC8A9, 0x0229},
    {0xC8AA, 0x022A},
    {0xC8AB, 0x022B},
    {0xC8AC, 0x022C},
    {0xC8AD, 0x022D},
    {0xC8AE, 0x022E},
    {0xC8AF, 0x022F},
    {0xC8B0, 0x0230},
    {0xC8B1, 0x0231},
    {0xC8B2, 0x0232},
    {0xC8B3, 0x0233},
    {0xC8B4, 0x0234},
    {0xC8B5, 0x0235},
    {0xC8B6, 0x0236},
    {0xC8B7, 0x0237},
    {0xC8B8, 0x0238},
    {0xC8B9, 0x0239},
    {0xC8BA, 0x023A},
    {0xC8BB, 0x023B},
    {0xC8BC, 0x023C},
    {0xC8BD, 0x023D},
    {0xC8BE, 0x023E},
    {0xC8BF, 0x023F},
    {0xC980, 0x0240},
    {0xC981, 0x0241},
    {0xC982, 0x0242},
    {0xC983, 0x0243},
    {0xC984, 0x0244},
    {0xC985, 0x0245},
    {0xC986, 0x0246},
    {0xC987, 0x0247},
    {0xC988, 0x0248},
    {0xC989, 0x0249},
    {0xC98A, 0x024A},
    {0xC98B, 0x024B},
    {0xC98C, 0x024C},
    {0xC98D, 0x024D},
    {0xC98E, 0x024E},
    {0xC98F, 0x024F},
    {0xC990, 0x0250},
    {0xC991, 0x0251},
    {0xC992, 0x0252},
    {0xC993, 0x0253},
    {0xC994, 0x0254},
    {0xC995, 0x0255},
    {0xC996, 0x0256},
    {0xC997, 0x0257},
    {0xC998, 0x0258},
    {0xC999, 0x0259},
    {0xC99A, 0x025A},
    {0xC99B, 0x025B},
    {0xC99C, 0x025C},
    {0xC99D, 0x025D},
    {0xC99E, 0x025E},
    {0xC99F, 0x025F},
    {0xC9A0, 0x0260},
    {0xC9A1, 0x0261},
    {0xC9A2, 0x0262},
    {0xC9A3, 0x0263},
    {0xC9A4, 0x0264},
    {0xC9A5, 0x0265},
    {0xC9A6, 0x0266},
    {0xC9A7, 0x0267},
    {0xC9A8, 0x0268},
    {0xC9A9, 0x0269},
    {0xC9AA, 0x026A},
    {0xC9AB, 0x026B},
    {0xC9AC, 0x026C},
    {0xC9AD, 0x026D},
    {0xC9AE, 0x026E},
    {0xC9AF, 0x026F},
    {0xC9B0, 0x0270},
    {0xC9B1, 0x0271},
    {0xC9B2, 0x0272},
    {0xC9B3, 0x0273},
    {0xC9B4, 0x0274},
    {0xC9B5, 0x0275},
    {0xC9B6, 0x0276},
    {0xC9B7, 0x0277},
    {0xC9B8, 0x0278},
    {0xC9B9, 0x0279},
    {0xC9BA, 0x027A},
    {0xC9BB, 0x027B},
    {0xC9BC, 0x027C},
    {0xC9BD, 0x027D},
    {0xC9BE, 0x027E},
    {0xC9BF, 0x027F},
    {0xCA80, 0x0280},
    {0xCA81, 0x0281},
    {0xCA82, 0x0282},
    {0xCA83, 0x0283},
    {0xCA84, 0x0284},
    {0xCA85, 0x0285},
    {0xCA86, 0x0286},
    {0xCA87, 0x0287},
    {0xCA88, 0x0288},
    {0xCA89, 0x0289},
    {0xCA8A, 0x028A},
    {0xCA8B, 0x028B},
    {0xCA8C, 0x028C},
    {0xCA8D, 0x028D},
    {0xCA8E, 0x028E},
    {0xCA8F, 0x028F},
    {0xCA90, 0x0290},
    {0xCA91, 0x0291},
    {0xCA92, 0x0292},
    {0xCA93, 0x0293},
    {0xCA94, 0x0294},
    {0xCA95, 0x0295},
    {0xCA96, 0x0296},
    {0xCA97, 0x0297},
    {0xCA98, 0x0298},
    {0xCA99, 0x0299},
    {0xCA9A, 0x029A},
    {0xCA9B, 0x029B},
    {0xCA9C, 0x029C},
    {0xCA9D, 0x029D},
    {0xCA9E, 0x029E},
    {0xCA9F, 0x029F},
    {0xCAA0, 0x02A0},
    {0xCAA1, 0x02A1},
    {0xCAA2, 0x02A2},
    {0xCAA3, 0x02A3},
    {0xCAA4, 0x02A4},
    {0xCAA5, 0x02A5},
    {0xCAA6, 0x02A6},
    {0xCAA7, 0x02A7},
    {0xCAA8, 0x02A8},
    {0xCAA9, 0x02A9},
    {0xCAAA, 0x02AA},
    {0xCAAB, 0x02AB},
    {0xCAAC, 0x02AC},
    {0xCAAD, 0x02AD},
    {0xCAAE, 0x02AE},
    {0xCAAF, 0x02AF},
    {0xCAB0, 0x02B0},
    {0xCAB1, 0x02B1},
    {0xCAB2, 0x02B2},
    {0xCAB3, 0x02B3},
    {0xCAB4, 0x02B4},
    {0xCAB5, 0x02B5},
    {0xCAB6, 0x02B6},
    {0xCAB7, 0x02B7},
    {0xCAB8, 0x02B8},
    {0xCAB9, 0x02B9},
    {0xCABA, 0x02BA},
    {0xCABB, 0x02BB},
    {0xCABC, 0x02BC},
    {0xCABD, 0x02BD},
    {0xCABE, 0x02BE},
    {0xCABF, 0x02BF},
    {0xCB80, 0x02C0},
    {0xCB81, 0x02C1},
    {0xCB82, 0x02C2},
    {0xCB83, 0x02C3},
    {0xCB84, 0x02C4},
    {0xCB85, 0x02C5},
    {0xCB86, 0x02C6},
    {0xCB87, 0x02C7},
    {0xCB88, 0x02C8},
    {0xCB89, 0x02C9},
    {0xCB8A, 0x02CA},
    {0xCB8B, 0x02CB},
    {0xCB8C, 0x02CC},
    {0xCB8D, 0x02CD},
    {0xCB8E, 0x02CE},
    {0xCB8F, 0x02CF},
    {0xCB90, 0x02D0},
    {0xCB91, 0x02D1},
    {0xCB92, 0x02D2},
    {0xCB93, 0x02D3},
    {0xCB94, 0x02D4},
    {0xCB95, 0x02D5},
    {0xCB96, 0x02D6},
    {0xCB97, 0x02D7},
    {0xCB98, 0x02D8},
    {0xCB99, 0x02D9},
    {0xCB9A, 0x02DA},
    {0xCB9B, 0x02DB},
    {0xCB9C, 0x02DC},
    {0xCB9D, 0x02DD},
    {0xCB9E, 0x02DE},
    {0xCB9F, 0x02DF},
    {0xCBA0, 0x02E0},
    {0xCBA1, 0x02E1},
    {0xCBA2, 0x02E2},
    {0xCBA3, 0x02E3},
    {0xCBA4, 0x02E4},
    {0xCBA5, 0x02E5},
    {0xCBA6, 0x02E6},
    {0xCBA7, 0x02E7},
    {0xCBA8, 0x02E8},
    {0xCBA9, 0x02E9},
    {0xCBAA, 0x02EA},
    {0xCBAB, 0x02EB},
    {0xCBAC, 0x02EC},
    {0xCBAD, 0x02ED},
    {0xCBAE, 0x02EE},
    {0xCBAF, 0x02EF},
    {0xCBB0, 0x02F0},
    {0xCBB1, 0x02F1},
    {0xCBB2, 0x02F2},
    {0xCBB3, 0x02F3},
    {0xCBB4, 0x02F4},
    {0xCBB5, 0x02F5},
    {0xCBB6, 0x02F6},
    {0xCBB7, 0x02F7},
    {0xCBB8, 0x02F8},
    {0xCBB9, 0x02F9},
    {0xCBBA, 0x02FA},
    {0xCBBB, 0x02FB},
    {0xCBBC, 0x02FC},
    {0xCBBD, 0x02FD},
    {0xCBBE, 0x02FE},
    {0xCBBF, 0x02FF},
    {0xCC80, 0x0300},
    {0xCC81, 0x0301},
    {0xCC82, 0x0302},
    {0xCC83, 0x0303},
    {0xCC84, 0x0304},
    {0xCC85, 0x0305},
    {0xCC86, 0x0306},
    {0xCC87, 0x0307},
    {0xCC88, 0x0308},
    {0xCC89, 0x0309},
    {0xCC8A, 0x030A},
    {0xCC8B, 0x030B},
    {0xCC8C, 0x030C},
    {0xCC8D, 0x030D},
    {0xCC8E, 0x030E},
    {0xCC8F, 0x030F},
    {0xCC90, 0x0310},
    {0xCC91, 0x0311},
    {0xCC92, 0x0312},
    {0xCC93, 0x0313},
    {0xCC94, 0x0314},
    {0xCC95, 0x0315},
    {0xCC96, 0x0316},
    {0xCC97, 0x0317},
    {0xCC98, 0x0318},
    {0xCC99, 0x0319},
    {0xCC9A, 0x031A},
    {0xCC9B, 0x031B},
    {0xCC9C, 0x031C},
    {0xCC9D, 0x031D},
    {0xCC9E, 0x031E},
    {0xCC9F, 0x031F},
    {0xCCA0, 0x0320},
    {0xCCA1, 0x0321},
    {0xCCA2, 0x0322},
    {0xCCA3, 0x0323},
    {0xCCA4, 0x0324},
    {0xCCA5, 0x0325},
    {0xCCA6, 0x0326},
    {0xCCA7, 0x0327},
    {0xCCA8, 0x0328},
    {0xCCA9, 0x0329},
    {0xCCAA, 0x032A},
    {0xCCAB, 0x032B},
    {0xCCAC, 0x032C},
    {0xCCAD, 0x032D},
    {0xCCAE, 0x032E},
    {0xCCAF, 0x032F},
    {0xCCB0, 0x0330},
    {0xCCB1, 0x0331},
    {0xCCB2, 0x0332},
    {0xCCB3, 0x0333},
    {0xCCB4, 0x0334},
    {0xCCB5, 0x0335},
    {0xCCB6, 0x0336},
    {0xCCB7, 0x0337},
    {0xCCB8, 0x0338},
    {0xCCB9, 0x0339},
    {0xCCBA, 0x033A},
    {0xCCBB, 0x033B},
    {0xCCBC, 0x033C},
    {0xCCBD, 0x033D},
    {0xCCBE, 0x033E},
    {0xCCBF, 0x033F},
    {0xCD80, 0x0340},
    {0xCD81, 0x0341},
    {0xCD82, 0x0342},
    {0xCD83, 0x0343},
    {0xCD84, 0x0344},
    {0xCD85, 0x0345},
    {0xCD86, 0x0346},
    {0xCD87, 0x0347},
    {0xCD88, 0x0348},
    {0xCD89, 0x0349},
    {0xCD8A, 0x034A},
    {0xCD8B, 0x034B},
    {0xCD8C, 0x034C},
    {0xCD8D, 0x034D},
    {0xCD8E, 0x034E},
    {0xCD8F, 0x034F},
    {0xCD90, 0x0350},
    {0xCD91, 0x0351},
    {0xCD92, 0x0352},
    {0xCD93, 0x0353},
    {0xCD94, 0x0354},
    {0xCD95, 0x0355},
    {0xCD96, 0x0356},
    {0xCD97, 0x0357},
    {0xCD98, 0x0358},
    {0xCD99, 0x0359},
    {0xCD9A, 0x035A},
    {0xCD9B, 0x035B},
    {0xCD9C, 0x035C},
    {0xCD9D, 0x035D},
    {0xCD9E, 0x035E},
    {0xCD9F, 0x035F},
    {0xCDA0, 0x0360},
    {0xCDA1, 0x0361},
    {0xCDA2, 0x0362},
    {0xCDA3, 0x0363},
    {0xCDA4, 0x0364},
    {0xCDA5, 0x0365},
    {0xCDA6, 0x0366},
    {0xCDA7, 0x0367},
    {0xCDA8, 0x0368},
    {0xCDA9, 0x0369},
    {0xCDAA, 0x036A},
    {0xCDAB, 0x036B},
    {0xCDAC, 0x036C},
    {0xCDAD, 0x036D},
    {0xCDAE, 0x036E},
    {0xCDAF, 0x036F},
    {0xCDB0, 0x0370},
    {0xCDB1, 0x0371},
    {0xCDB2, 0x0372},
    {0xCDB3, 0x0373},
    {0xCDB4, 0x0374},
    {0xCDB5, 0x0375},
    {0xCDB6, 0x0376},
    {0xCDB7, 0x0377},
    {0xCDB8, 0x0378},
    {0xCDB9, 0x0379},
    {0xCDBA, 0x037A},
    {0xCDBB, 0x037B},
    {0xCDBC, 0x037C},
    {0xCDBD, 0x037D},
    {0xCDBE, 0x037E},
    {0xCDBF, 0x037F},
    {0xCE80, 0x0380},
    {0xCE81, 0x0381},
    {0xCE82, 0x0382},
    {0xCE83, 0x0383},
    {0xCE84, 0x0384},
    {0xCE85, 0x0385},
    {0xCE86, 0x0386},
    {0xCE87, 0x0387},
    {0xCE88, 0x0388},
    {0xCE89, 0x0389},
    {0xCE8A, 0x038A},
    {0xCE8B, 0x038B},
    {0xCE8C, 0x038C},
    {0xCE8D, 0x038D},
    {0xCE8E, 0x038E},
    {0xCE8F, 0x038F},
    {0xCE90, 0x0390},
    {0xCE91, 0x0391},
    {0xCE92, 0x0392},
    {0xCE93, 0x0393},
    {0xCE94, 0x0394},
    {0xCE95, 0x0395},
    {0xCE96, 0x0396},
    {0xCE97, 0x0397},
    {0xCE98, 0x0398},
    {0xCE99, 0x0399},
    {0xCE9A, 0x039A},
    {0xCE9B, 0x039B},
    {0xCE9C, 0x039C},
    {0xCE9D, 0x039D},
    {0xCE9E, 0x039E},
    {0xCE9F, 0x039F},
    {0xCEA0, 0x03A0},
    {0xCEA1, 0x03A1},
    {0xCEA2, 0x03A2},
    {0xCEA3, 0x03A3},
    {0xCEA4, 0x03A4},
    {0xCEA5, 0x03A5},
    {0xCEA6, 0x03A6},
    {0xCEA7, 0x03A7},
    {0xCEA8, 0x03A8},
    {0xCEA9, 0x03A9},
    {0xCEAA, 0x03AA},
    {0xCEAB, 0x03AB},
    {0xCEAC, 0x03AC},
    {0xCEAD, 0x03AD},
    {0xCEAE, 0x03AE},
    {0xCEAF, 0x03AF},
    {0xCEB0, 0x03B0},
    {0xCEB1, 0x03B1},
    {0xCEB2, 0x03B2},
    {0xCEB3, 0x03B3},
    {0xCEB4, 0x03B4},
    {0xCEB5, 0x03B5},
    {0xCEB6, 0x03B6},
    {0xCEB7, 0x03B7},
    {0xCEB8, 0x03B8},
    {0xCEB9, 0x03B9},
    {0xCEBA, 0x03BA},
    {0xCEBB, 0x03BB},
    {0xCEBC, 0x03BC},
    {0xCEBD, 0x03BD},
    {0xCEBE, 0x03BE},
    {0xCEBF, 0x03BF},
    {0xCF80, 0x03C0},
    {0xCF81, 0x03C1},
    {0xCF82, 0x03C2},
    {0xCF83, 0x03C3},
    {0xCF84, 0x03C4},
    {0xCF85, 0x03C5},
    {0xCF86, 0x03C6},
    {0xCF87, 0x03C7},
    {0xCF88, 0x03C8},
    {0xCF89, 0x03C9},
    {0xCF8A, 0x03CA},
    {0xCF8B, 0x03CB},
    {0xCF8C, 0x03CC},
    {0xCF8D, 0x03CD},
    {0xCF8E, 0x03CE},
    {0xCF8F, 0x03CF},
    {0xCF90, 0x03D0},
    {0xCF91, 0x03D1},
    {0xCF92, 0x03D2},
    {0xCF93, 0x03D3},
    {0xCF94, 0x03D4},
    {0xCF95, 0x03D5},
    {0xCF96, 0x03D6},
    {0xCF97, 0x03D7},
    {0xCF98, 0x03D8},
    {0xCF99, 0x03D9},
    {0xCF9A, 0x03DA},
    {0xCF9B, 0x03DB},
    {0xCF9C, 0x03DC},
    {0xCF9D, 0x03DD},
    {0xCF9E, 0x03DE},
    {0xCF9F, 0x03DF},
    {0xCFA0, 0x03E0},
    {0xCFA1, 0x03E1},
    {0xCFA2, 0x03E2},
    {0xCFA3, 0x03E3},
    {0xCFA4, 0x03E4},
    {0xCFA5, 0x03E5},
    {0xCFA6, 0x03E6},
    {0xCFA7, 0x03E7},
    {0xCFA8, 0x03E8},
    {0xCFA9, 0x03E9},
    {0xCFAA, 0x03EA},
    {0xCFAB, 0x03EB},
    {0xCFAC, 0x03EC},
    {0xCFAD, 0x03ED},
    {0xCFAE, 0x03EE},
    {0xCFAF, 0x03EF},
    {0xCFB0, 0x03F0},
    {0xCFB1, 0x03F1},
    {0xCFB2, 0x03F2},
    {0xCFB3, 0x03F3},
    {0xCFB4, 0x03F4},
    {0xCFB5, 0x03F5},
    {0xCFB6, 0x03F6},
    {0xCFB7, 0x03F7},
    {0xCFB8, 0x03F8},
    {0xCFB9, 0x03F9},
    {0xCFBA, 0x03FA},
    {0xCFBB, 0x03FB},
    {0xCFBC, 0x03FC},
    {0xCFBD, 0x03FD},
    {0xCFBE, 0x03FE},
    {0xCFBF, 0x03FF},
    {0xD080, 0x0400},
    {0xD081, 0x0401},
    {0xD082, 0x0402},
    {0xD083, 0x0403},
    {0xD084, 0x0404},
    {0xD085, 0x0405},
    {0xD086, 0x0406},
    {0xD087, 0x0407},
    {0xD088, 0x0408},
    {0xD089, 0x0409},
    {0xD08A, 0x040A},
    {0xD08B, 0x040B},
    {0xD08C, 0x040C},
    {0xD08D, 0x040D},
    {0xD08E, 0x040E},
    {0xD08F, 0x040F},
    {0xD090, 0x0410},
    {0xD091, 0x0411},
    {0xD092, 0x0412},
    {0xD093, 0x0413},
    {0xD094, 0x0414},
    {0xD095, 0x0415},
    {0xD096, 0x0416},
    {0xD097, 0x0417},
    {0xD098, 0x0418},
    {0xD099, 0x0419},
    {0xD09A, 0x041A},
    {0xD09B, 0x041B},
    {0xD09C, 0x041C},
    {0xD09D, 0x041D},
    {0xD09E, 0x041E},
    {0xD09F, 0x041F},
    {0xD0A0, 0x0420},
    {0xD0A1, 0x0421},
    {0xD0A2, 0x0422},
    {0xD0A3, 0x0423},
    {0xD0A4, 0x0424},
    {0xD0A5, 0x0425},
    {0xD0A6, 0x0426},
    {0xD0A7, 0x0427},
    {0xD0A8, 0x0428},
    {0xD0A9, 0x0429},
    {0xD0AA, 0x042A},
    {0xD0AB, 0x042B},
    {0xD0AC, 0x042C},
    {0xD0AD, 0x042D},
    {0xD0AE, 0x042E},
    {0xD0AF, 0x042F},
    {0xD0B0, 0x0430},
    {0xD0B1, 0x0431},
    {0xD0B2, 0x0432},
    {0xD0B3, 0x0433},
    {0xD0B4, 0x0434},
    {0xD0B5, 0x0435},
    {0xD0B6, 0x0436},
    {0xD0B7, 0x0437},
    {0xD0B8, 0x0438},
    {0xD0B9, 0x0439},
    {0xD0BA, 0x043A},
    {0xD0BB, 0x043B},
    {0xD0BC, 0x043C},
    {0xD0BD, 0x043D},
    {0xD0BE, 0x043E},
    {0xD0BF, 0x043F},
    {0xD180, 0x0440},
    {0xD181, 0x0441},
    {0xD182, 0x0442},
    {0xD183, 0x0443},
    {0xD184, 0x0444},
    {0xD185, 0x0445},
    {0xD186, 0x0446},
    {0xD187, 0x0447},
    {0xD188, 0x0448},
    {0xD189, 0x0449},
    {0xD18A, 0x044A},
    {0xD18B, 0x044B},
    {0xD18C, 0x044C},
    {0xD18D, 0x044D},
    {0xD18E, 0x044E},
    {0xD18F, 0x044F},
    {0xD190, 0x0450},
    {0xD191, 0x0451},
    {0xD192, 0x0452},
    {0xD193, 0x0453},
    {0xD194, 0x0454},
    {0xD195, 0x0455},
    {0xD196, 0x0456},
    {0xD197, 0x0457},
    {0xD198, 0x0458},
    {0xD199, 0x0459},
    {0xD19A, 0x045A},
    {0xD19B, 0x045B},
    {0xD19C, 0x045C},
    {0xD19D, 0x045D},
    {0xD19E, 0x045E},
    {0xD19F, 0x045F},
    {0xD1A0, 0x0460},
    {0xD1A1, 0x0461},
    {0xD1A2, 0x0462},
    {0xD1A3, 0x0463},
    {0xD1A4, 0x0464},
    {0xD1A5, 0x0465},
    {0xD1A6, 0x0466},
    {0xD1A7, 0x0467},
    {0xD1A8, 0x0468},
    {0xD1A9, 0x0469},
    {0xD1AA, 0x046A},
    {0xD1AB, 0x046B},
    {0xD1AC, 0x046C},
    {0xD1AD, 0x046D},
    {0xD1AE, 0x046E},
    {0xD1AF, 0x046F},
    {0xD1B0, 0x0470},
    {0xD1B1, 0x0471},
    {0xD1B2, 0x0472},
    {0xD1B3, 0x0473},
    {0xD1B4, 0x0474},
    {0xD1B5, 0x0475},
    {0xD1B6, 0x0476},
    {0xD1B7, 0x0477},
    {0xD1B8, 0x0478},
    {0xD1B9, 0x0479},
    {0xD1BA, 0x047A},
    {0xD1BB, 0x047B},
    {0xD1BC, 0x047C},
    {0xD1BD, 0x047D},
    {0xD1BE, 0x047E},
    {0xD1BF, 0x047F},
    {0xD280, 0x0480},
    {0xD281, 0x0481},
    {0xD282, 0x0482},
    {0xD283, 0x0483},
    {0xD284, 0x0484},
    {0xD285, 0x0485},
    {0xD286, 0x0486},
    {0xD287, 0x0487},
    {0xD288, 0x0488},
    {0xD289, 0x0489},
    {0xD28A, 0x048A},
    {0xD28B, 0x048B},
    {0xD28C, 0x048C},
    {0xD28D, 0x048D},
    {0xD28E, 0x048E},
    {0xD28F, 0x048F},
    {0xD290, 0x0490},
    {0xD291, 0x0491},
    {0xD292, 0x0492},
    {0xD293, 0x0493},
    {0xD294, 0x0494},
    {0xD295, 0x0495},
    {0xD296, 0x0496},
    {0xD297, 0x0497},
    {0xD298, 0x0498},
    {0xD299, 0x0499},
    {0xD29A, 0x049A},
    {0xD29B, 0x049B},
    {0xD29C, 0x049C},
    {0xD29D, 0x049D},
    {0xD29E, 0x049E},
    {0xD29F, 0x049F},
    {0xD2A0, 0x04A0},
    {0xD2A1, 0x04A1},
    {0xD2A2, 0x04A2},
    {0xD2A3, 0x04A3},
    {0xD2A4, 0x04A4},
    {0xD2A5, 0x04A5},
    {0xD2A6, 0x04A6},
    {0xD2A7, 0x04A7},
    {0xD2A8, 0x04A8},
    {0xD2A9, 0x04A9},
    {0xD2AA, 0x04AA},
    {0xD2AB, 0x04AB},
    {0xD2AC, 0x04AC},
    {0xD2AD, 0x04AD},
    {0xD2AE, 0x04AE},
    {0xD2AF, 0x04AF},
    {0xD2B0, 0x04B0},
    {0xD2B1, 0x04B1},
    {0xD2B2, 0x04B2},
    {0xD2B3, 0x04B3},
    {0xD2B4, 0x04B4},
    {0xD2B5, 0x04B5},
    {0xD2B6, 0x04B6},
    {0xD2B7, 0x04B7},
    {0xD2B8, 0x04B8},
    {0xD2B9, 0x04B9},
    {0xD2BA, 0x04BA},
    {0xD2BB, 0x04BB},
    {0xD2BC, 0x04BC},
    {0xD2BD, 0x04BD},
    {0xD2BE, 0x04BE},
    {0xD2BF, 0x04BF},
    {0xD380, 0x04C0},
    {0xD381, 0x04C1},
    {0xD382, 0x04C2},
    {0xD383, 0x04C3},
    {0xD384, 0x04C4},
    {0xD385, 0x04C5},
    {0xD386, 0x04C6},
    {0xD387, 0x04C7},
    {0xD388, 0x04C8},
    {0xD389, 0x04C9},
    {0xD38A, 0x04CA},
    {0xD38B, 0x04CB},
    {0xD38C, 0x04CC},
    {0xD38D, 0x04CD},
    {0xD38E, 0x04CE},
    {0xD38F, 0x04CF},
    {0xD390, 0x04D0},
    {0xD391, 0x04D1},
    {0xD392, 0x04D2},
    {0xD393, 0x04D3},
    {0xD394, 0x04D4},
    {0xD395, 0x04D5},
    {0xD396, 0x04D6},
    {0xD397, 0x04D7},
    {0xD398, 0x04D8},
    {0xD399, 0x04D9},
    {0xD39A, 0x04DA},
    {0xD39B, 0x04DB},
    {0xD39C, 0x04DC},
    {0xD39D, 0x04DD},
    {0xD39E, 0x04DE},
    {0xD39F, 0x04DF},
    {0xD3A0, 0x04E0},
    {0xD3A1, 0x04E1},
    {0xD3A2, 0x04E2},
    {0xD3A3, 0x04E3},
    {0xD3A4, 0x04E4},
    {0xD3A5, 0x04E5},
    {0xD3A6, 0x04E6},
    {0xD3A7, 0x04E7},
    {0xD3A8, 0x04E8},
    {0xD3A9, 0x04E9},
    {0xD3AA, 0x04EA},
    {0xD3AB, 0x04EB},
    {0xD3AC, 0x04EC},
    {0xD3AD, 0x04ED},
    {0xD3AE, 0x04EE},
    {0xD3AF, 0x04EF},
    {0xD3B0, 0x04F0},
    {0xD3B1, 0x04F1},
    {0xD3B2, 0x04F2},
    {0xD3B3, 0x04F3},
    {0xD3B4, 0x04F4},
    {0xD3B5, 0x04F5},
    {0xD3B6, 0x04F6},
    {0xD3B7, 0x04F7},
    {0xD3B8, 0x04F8},
    {0xD3B9, 0x04F9},
    {0xD3BA, 0x04FA},
    {0xD3BB, 0x04FB},
    {0xD3BC, 0x04FC},
    {0xD3BD, 0x04FD},
    {0xD3BE, 0x04FE},
    {0xD3BF, 0x04FF},
    {0xD480, 0x0500},
    {0xD481, 0x0501},
    {0xD482, 0x0502},
    {0xD483, 0x0503},
    {0xD484, 0x0504},
    {0xD485, 0x0505},
    {0xD486, 0x0506},
    {0xD487, 0x0507},
    {0xD488, 0x0508},
    {0xD489, 0x0509},
    {0xD48A, 0x050A},
    {0xD48B, 0x050B},
    {0xD48C, 0x050C},
    {0xD48D, 0x050D},
    {0xD48E, 0x050E},
    {0xD48F, 0x050F},
    {0xD490, 0x0510},
    {0xD491, 0x0511},
    {0xD492, 0x0512},
    {0xD493, 0x0513},
    {0xD494, 0x0514},
    {0xD495, 0x0515},
    {0xD496, 0x0516},
    {0xD497, 0x0517},
    {0xD498, 0x0518},
    {0xD499, 0x0519},
    {0xD49A, 0x051A},
    {0xD49B, 0x051B},
    {0xD49C, 0x051C},
    {0xD49D, 0x051D},
    {0xD49E, 0x051E},
    {0xD49F, 0x051F},
    {0xD4A0, 0x0520},
    {0xD4A1, 0x0521},
    {0xD4A2, 0x0522},
    {0xD4A3, 0x0523},
    {0xD4A4, 0x0524},
    {0xD4A5, 0x0525},
    {0xD4A6, 0x0526},
    {0xD4A7, 0x0527},
    {0xD4A8, 0x0528},
    {0xD4A9, 0x0529},
    {0xD4AA, 0x052A},
    {0xD4AB, 0x052B},
    {0xD4AC, 0x052C},
    {0xD4AD, 0x052D},
    {0xD4AE, 0x052E},
    {0xD4AF, 0x052F},
    {0xD4B0, 0x0530},
    {0xD4B1, 0x0531},
    {0xD4B2, 0x0532},
    {0xD4B3, 0x0533},
    {0xD4B4, 0x0534},
    {0xD4B5, 0x0535},
    {0xD4B6, 0x0536},
    {0xD4B7, 0x0537},
    {0xD4B8, 0x0538},
    {0xD4B9, 0x0539},
    {0xD4BA, 0x053A},
    {0xD4BB, 0x053B},
    {0xD4BC, 0x053C},
    {0xD4BD, 0x053D},
    {0xD4BE, 0x053E},
    {0xD4BF, 0x053F},
    {0xD580, 0x0540},
    {0xD581, 0x0541},
    {0xD582, 0x0542},
    {0xD583, 0x0543},
    {0xD584, 0x0544},
    {0xD585, 0x0545},
    {0xD586, 0x0546},
    {0xD587, 0x0547},
    {0xD588, 0x0548},
    {0xD589, 0x0549},
    {0xD58A, 0x054A},
    {0xD58B, 0x054B},
    {0xD58C, 0x054C},
    {0xD58D, 0x054D},
    {0xD58E, 0x054E},
    {0xD58F, 0x054F},
    {0xD590, 0x0550},
    {0xD591, 0x0551},
    {0xD592, 0x0552},
    {0xD593, 0x0553},
    {0xD594, 0x0554},
    {0xD595, 0x0555},
    {0xD596, 0x0556},
    {0xD597, 0x0557},
    {0xD598, 0x0558},
    {0xD599, 0x0559},
    {0xD59A, 0x055A},
    {0xD59B, 0x055B},
    {0xD59C, 0x055C},
    {0xD59D, 0x055D},
    {0xD59E, 0x055E},
    {0xD59F, 0x055F},
    {0xD5A0, 0x0560},
    {0xD5A1, 0x0561},
    {0xD5A2, 0x0562},
    {0xD5A3, 0x0563},
    {0xD5A4, 0x0564},
    {0xD5A5, 0x0565},
    {0xD5A6, 0x0566},
    {0xD5A7, 0x0567},
    {0xD5A8, 0x0568},
    {0xD5A9, 0x0569},
    {0xD5AA, 0x056A},
    {0xD5AB, 0x056B},
    {0xD5AC, 0x056C},
    {0xD5AD, 0x056D},
    {0xD5AE, 0x056E},
    {0xD5AF, 0x056F},
    {0xD5B0, 0x0570},
    {0xD5B1, 0x0571},
    {0xD5B2, 0x0572},
    {0xD5B3, 0x0573},
    {0xD5B4, 0x0574},
    {0xD5B5, 0x0575},
    {0xD5B6, 0x0576},
    {0xD5B7, 0x0577},
    {0xD5B8, 0x0578},
    {0xD5B9, 0x0579},
    {0xD5BA, 0x057A},
    {0xD5BB, 0x057B},
    {0xD5BC, 0x057C},
    {0xD5BD, 0x057D},
    {0xD5BE, 0x057E},
    {0xD5BF, 0x057F},
    {0xD680, 0x0580},
    {0xD681, 0x0581},
    {0xD682, 0x0582},
    {0xD683, 0x0583},
    {0xD684, 0x0584},
    {0xD685, 0x0585},
    {0xD686, 0x0586},
    {0xD687, 0x0587},
    {0xD688, 0x0588},
    {0xD689, 0x0589},
    {0xD68A, 0x058A},
    {0xD68B, 0x058B},
    {0xD68C, 0x058C},
    {0xD68D, 0x058D},
    {0xD68E, 0x058E},
    {0xD68F, 0x058F},
    {0xD690, 0x0590},
    {0xD691, 0x0591},
    {0xD692, 0x0592},
    {0xD693, 0x0593},
    {0xD694, 0x0594},
    {0xD695, 0x0595},
    {0xD696, 0x0596},
    {0xD697, 0x0597},
    {0xD698, 0x0598},
    {0xD699, 0x0599},
    {0xD69A, 0x059A},
    {0xD69B, 0x059B},
    {0xD69C, 0x059C},
    {0xD69D, 0x059D},
    {0xD69E, 0x059E},
    {0xD69F, 0x059F},
    {0xD6A0, 0x05A0},
    {0xD6A1, 0x05A1},
    {0xD6A2, 0x05A2},
    {0xD6A3, 0x05A3},
    {0xD6A4, 0x05A4},
    {0xD6A5, 0x05A5},
    {0xD6A6, 0x05A6},
    {0xD6A7, 0x05A7},
    {0xD6A8, 0x05A8},
    {0xD6A9, 0x05A9},
    {0xD6AA, 0x05AA},
    {0xD6AB, 0x05AB},
    {0xD6AC, 0x05AC},
    {0xD6AD, 0x05AD},
    {0xD6AE, 0x05AE},
    {0xD6AF, 0x05AF},
    {0xD6B0, 0x05B0},
    {0xD6B1, 0x05B1},
    {0xD6B2, 0x05B2},
    {0xD6B3, 0x05B3},
    {0xD6B4, 0x05B4},
    {0xD6B5, 0x05B5},
    {0xD6B6, 0x05B6},
    {0xD6B7, 0x05B7},
    {0xD6B8, 0x05B8},
    {0xD6B9, 0x05B9},
    {0xD6BA, 0x05BA},
    {0xD6BB, 0x05BB},
    {0xD6BC, 0x05BC},
    {0xD6BD, 0x05BD},
    {0xD6BE, 0x05BE},
    {0xD6BF, 0x05BF},
    {0xD780, 0x05C0},
    {0xD781, 0x05C1},
    {0xD782, 0x05C2},
    {0xD783, 0x05C3},
    {0xD784, 0x05C4},
    {0xD785, 0x05C5},
    {0xD786, 0x05C6},
    {0xD787, 0x05C7},
    {0xD788, 0x05C8},
    {0xD789, 0x05C9},
    {0xD78A, 0x05CA},
    {0xD78B, 0x05CB},
    {0xD78C, 0x05CC},
    {0xD78D, 0x05CD},
    {0xD78E, 0x05CE},
    {0xD78F, 0x05CF},
    {0xD790, 0x05D0},
    {0xD791, 0x05D1},
    {0xD792, 0x05D2},
    {0xD793, 0x05D3},
    {0xD794, 0x05D4},
    {0xD795, 0x05D5},
    {0xD796, 0x05D6},
    {0xD797, 0x05D7},
    {0xD798, 0x05D8},
    {0xD799, 0x05D9},
    {0xD79A, 0x05DA},
    {0xD79B, 0x05DB},
    {0xD79C, 0x05DC},
    {0xD79D, 0x05DD},
    {0xD79E, 0x05DE},
    {0xD79F, 0x05DF},
    {0xD7A0, 0x05E0},
    {0xD7A1, 0x05E1},
    {0xD7A2, 0x05E2},
    {0xD7A3, 0x05E3},
    {0xD7A4, 0x05E4},
    {0xD7A5, 0x05E5},
    {0xD7A6, 0x05E6},
    {0xD7A7, 0x05E7},
    {0xD7A8, 0x05E8},
    {0xD7A9, 0x05E9},
    {0xD7AA, 0x05EA},
    {0xD7AB, 0x05EB},
    {0xD7AC, 0x05EC},
    {0xD7AD, 0x05ED},
    {0xD7AE, 0x05EE},
    {0xD7AF, 0x05EF},
    {0xD7B0, 0x05F0},
    {0xD7B1, 0x05F1},
    {0xD7B2, 0x05F2},
    {0xD7B3, 0x05F3},
    {0xD7B4, 0x05F4},
    {0xD7B5, 0x05F5},
    {0xD7B6, 0x05F6},
    {0xD7B7, 0x05F7},
    {0xD7B8, 0x05F8},
    {0xD7B9, 0x05F9},
    {0xD7BA, 0x05FA},
    {0xD7BB, 0x05FB},
    {0xD7BC, 0x05FC},
    {0xD7BD, 0x05FD},
    {0xD7BE, 0x05FE},
    {0xD7BF, 0x05FF},
    {0xD880, 0x0600},
    {0xD881, 0x0601},
    {0xD882, 0x0602},
    {0xD883, 0x0603},
    {0xD884, 0x0604},
    {0xD885, 0x0605},
    {0xD886, 0x0606},
    {0xD887, 0x0607},
    {0xD888, 0x0608},
    {0xD889, 0x0609},
    {0xD88A, 0x060A},
    {0xD88B, 0x060B},
    {0xD88C, 0x060C},
    {0xD88D, 0x060D},
    {0xD88E, 0x060E},
    {0xD88F, 0x060F},
    {0xD890, 0x0610},
    {0xD891, 0x0611},
    {0xD892, 0x0612},
    {0xD893, 0x0613},
    {0xD894, 0x0614},
    {0xD895, 0x0615},
    {0xD896, 0x0616},
    {0xD897, 0x0617},
    {0xD898, 0x0618},
    {0xD899, 0x0619},
    {0xD89A, 0x061A},
    {0xD89B, 0x061B},
    {0xD89C, 0x061C},
    {0xD89D, 0x061D},
    {0xD89E, 0x061E},
    {0xD89F, 0x061F},
    {0xD8A0, 0x0620},
    {0xD8A1, 0x0621},
    {0xD8A2, 0x0622},
    {0xD8A3, 0x0623},
    {0xD8A4, 0x0624},
    {0xD8A5, 0x0625},
    {0xD8A6, 0x0626},
    {0xD8A7, 0x0627},
    {0xD8A8, 0x0628},
    {0xD8A9, 0x0629},
    {0xD8AA, 0x062A},
    {0xD8AB, 0x062B},
    {0xD8AC, 0x062C},
    {0xD8AD, 0x062D},
    {0xD8AE, 0x062E},
    {0xD8AF, 0x062F},
    {0xD8B0, 0x0630},
    {0xD8B1, 0x0631},
    {0xD8B2, 0x0632},
    {0xD8B3, 0x0633},
    {0xD8B4, 0x0634},
    {0xD8B5, 0x0635},
    {0xD8B6, 0x0636},
    {0xD8B7, 0x0637},
    {0xD8B8, 0x0638},
    {0xD8B9, 0x0639},
    {0xD8BA, 0x063A},
    {0xD8BB, 0x063B},
    {0xD8BC, 0x063C},
    {0xD8BD, 0x063D},
    {0xD8BE, 0x063E},
    {0xD8BF, 0x063F},
    {0xD980, 0x0640},
    {0xD981, 0x0641},
    {0xD982, 0x0642},
    {0xD983, 0x0643},
    {0xD984, 0x0644},
    {0xD985, 0x0645},
    {0xD986, 0x0646},
    {0xD987, 0x0647},
    {0xD988, 0x0648},
    {0xD989, 0x0649},
    {0xD98A, 0x064A},
    {0xD98B, 0x064B},
    {0xD98C, 0x064C},
    {0xD98D, 0x064D},
    {0xD98E, 0x064E},
    {0xD98F, 0x064F},
    {0xD990, 0x0650},
    {0xD991, 0x0651},
    {0xD992, 0x0652},
    {0xD993, 0x0653},
    {0xD994, 0x0654},
    {0xD995, 0x0655},
    {0xD996, 0x0656},
    {0xD997, 0x0657},
    {0xD998, 0x0658},
    {0xD999, 0x0659},
    {0xD99A, 0x065A},
    {0xD99B, 0x065B},
    {0xD99C, 0x065C},
    {0xD99D, 0x065D},
    {0xD99E, 0x065E},
    {0xD99F, 0x065F},
    {0xD9A0, 0x0660},
    {0xD9A1, 0x0661},
    {0xD9A2, 0x0662},
    {0xD9A3, 0x0663},
    {0xD9A4, 0x0664},
    {0xD9A5, 0x0665},
    {0xD9A6, 0x0666},
    {0xD9A7, 0x0667},
    {0xD9A8, 0x0668},
    {0xD9A9, 0x0669},
    {0xD9AA, 0x066A},
    {0xD9AB, 0x066B},
    {0xD9AC, 0x066C},
    {0xD9AD, 0x066D},
    {0xD9AE, 0x066E},
    {0xD9AF, 0x066F},
    {0xD9B0, 0x0670},
    {0xD9B1, 0x0671},
    {0xD9B2, 0x0672},
    {0xD9B3, 0x0673},
    {0xD9B4, 0x0674},
    {0xD9B5, 0x0675},
    {0xD9B6, 0x0676},
    {0xD9B7, 0x0677},
    {0xD9B8, 0x0678},
    {0xD9B9, 0x0679},
    {0xD9BA, 0x067A},
    {0xD9BB, 0x067B},
    {0xD9BC, 0x067C},
    {0xD9BD, 0x067D},
    {0xD9BE, 0x067E},
    {0xD9BF, 0x067F},
    {0xDA80, 0x0680},
    {0xDA81, 0x0681},
    {0xDA82, 0x0682},
    {0xDA83, 0x0683},
    {0xDA84, 0x0684},
    {0xDA85, 0x0685},
    {0xDA86, 0x0686},
    {0xDA87, 0x0687},
    {0xDA88, 0x0688},
    {0xDA89, 0x0689},
    {0xDA8A, 0x068A},
    {0xDA8B, 0x068B},
    {0xDA8C, 0x068C},
    {0xDA8D, 0x068D},
    {0xDA8E, 0x068E},
    {0xDA8F, 0x068F},
    {0xDA90, 0x0690},
    {0xDA91, 0x0691},
    {0xDA92, 0x0692},
    {0xDA93, 0x0693},
    {0xDA94, 0x0694},
    {0xDA95, 0x0695},
    {0xDA96, 0x0696},
    {0xDA97, 0x0697},
    {0xDA98, 0x0698},
    {0xDA99, 0x0699},
    {0xDA9A, 0x069A},
    {0xDA9B, 0x069B},
    {0xDA9C, 0x069C},
    {0xDA9D, 0x069D},
    {0xDA9E, 0x069E},
    {0xDA9F, 0x069F},
    {0xDAA0, 0x06A0},
    {0xDAA1, 0x06A1},
    {0xDAA2, 0x06A2},
    {0xDAA3, 0x06A3},
    {0xDAA4, 0x06A4},
    {0xDAA5, 0x06A5},
    {0xDAA6, 0x06A6},
    {0xDAA7, 0x06A7},
    {0xDAA8, 0x06A8},
    {0xDAA9, 0x06A9},
    {0xDAAA, 0x06AA},
    {0xDAAB, 0x06AB},
    {0xDAAC, 0x06AC},
    {0xDAAD, 0x06AD},
    {0xDAAE, 0x06AE},
    {0xDAAF, 0x06AF},
    {0xDAB0, 0x06B0},
    {0xDAB1, 0x06B1},
    {0xDAB2, 0x06B2},
    {0xDAB3, 0x06B3},
    {0xDAB4, 0x06B4},
    {0xDAB5, 0x06B5},
    {0xDAB6, 0x06B6},
    {0xDAB7, 0x06B7},
    {0xDAB8, 0x06B8},
    {0xDAB9, 0x06B9},
    {0xDABA, 0x06BA},
    {0xDABB, 0x06BB},
    {0xDABC, 0x06BC},
    {0xDABD, 0x06BD},
    {0xDABE, 0x06BE},
    {0xDABF, 0x06BF},
    {0xDB80, 0x06C0},
    {0xDB81, 0x06C1},
    {0xDB82, 0x06C2},
    {0xDB83, 0x06C3},
    {0xDB84, 0x06C4},
    {0xDB85, 0x06C5},
    {0xDB86, 0x06C6},
    {0xDB87, 0x06C7},
    {0xDB88, 0x06C8},
    {0xDB89, 0x06C9},
    {0xDB8A, 0x06CA},
    {0xDB8B, 0x06CB},
    {0xDB8C, 0x06CC},
    {0xDB8D, 0x06CD},
    {0xDB8E, 0x06CE},
    {0xDB8F, 0x06CF},
    {0xDB90, 0x06D0},
    {0xDB91, 0x06D1},
    {0xDB92, 0x06D2},
    {0xDB93, 0x06D3},
    {0xDB94, 0x06D4},
    {0xDB95, 0x06D5},
    {0xDB96, 0x06D6},
    {0xDB97, 0x06D7},
    {0xDB98, 0x06D8},
    {0xDB99, 0x06D9},
    {0xDB9A, 0x06DA},
    {0xDB9B, 0x06DB},
    {0xDB9C, 0x06DC},
    {0xDB9D, 0x06DD},
    {0xDB9E, 0x06DE},
    {0xDB9F, 0x06DF},
    {0xDBA0, 0x06E0},
    {0xDBA1, 0x06E1},
    {0xDBA2, 0x06E2},
    {0xDBA3, 0x06E3},
    {0xDBA4, 0x06E4},
    {0xDBA5, 0x06E5},
    {0xDBA6, 0x06E6},
    {0xDBA7, 0x06E7},
    {0xDBA8, 0x06E8},
    {0xDBA9, 0x06E9},
    {0xDBAA, 0x06EA},
    {0xDBAB, 0x06EB},
    {0xDBAC, 0x06EC},
    {0xDBAD, 0x06ED},
    {0xDBAE, 0x06EE},
    {0xDBAF, 0x06EF},
    {0xDBB0, 0x06F0},
    {0xDBB1, 0x06F1},
    {0xDBB2, 0x06F2},
    {0xDBB3, 0x06F3},
    {0xDBB4, 0x06F4},
    {0xDBB5, 0x06F5},
    {0xDBB6, 0x06F6},
    {0xDBB7, 0x06F7},
    {0xDBB8, 0x06F8},
    {0xDBB9, 0x06F9},
    {0xDBBA, 0x06FA},
    {0xDBBB, 0x06FB},
    {0xDBBC, 0x06FC},
    {0xDBBD, 0x06FD},
    {0xDBBE, 0x06FE},
    {0xDBBF, 0x06FF},
    {0xDC80, 0x0700},
    {0xDC81, 0x0701},
    {0xDC82, 0x0702},
    {0xDC83, 0x0703},
    {0xDC84, 0x0704},
    {0xDC85, 0x0705},
    {0xDC86, 0x0706},
    {0xDC87, 0x0707},
    {0xDC88, 0x0708},
    {0xDC89, 0x0709},
    {0xDC8A, 0x070A},
    {0xDC8B, 0x070B},
    {0xDC8C, 0x070C},
    {0xDC8D, 0x070D},
    {0xDC8E, 0x070E},
    {0xDC8F, 0x070F},
    {0xDC90, 0x0710},
    {0xDC91, 0x0711},
    {0xDC92, 0x0712},
    {0xDC93, 0x0713},
    {0xDC94, 0x0714},
    {0xDC95, 0x0715},
    {0xDC96, 0x0716},
    {0xDC97, 0x0717},
    {0xDC98, 0x0718},
    {0xDC99, 0x0719},
    {0xDC9A, 0x071A},
    {0xDC9B, 0x071B},
    {0xDC9C, 0x071C},
    {0xDC9D, 0x071D},
    {0xDC9E, 0x071E},
    {0xDC9F, 0x071F},
    {0xDCA0, 0x0720},
    {0xDCA1, 0x0721},
    {0xDCA2, 0x0722},
    {0xDCA3, 0x0723},
    {0xDCA4, 0x0724},
    {0xDCA5, 0x0725},
    {0xDCA6, 0x0726},
    {0xDCA7, 0x0727},
    {0xDCA8, 0x0728},
    {0xDCA9, 0x0729},
    {0xDCAA, 0x072A},
    {0xDCAB, 0x072B},
    {0xDCAC, 0x072C},
    {0xDCAD, 0x072D},
    {0xDCAE, 0x072E},
    {0xDCAF, 0x072F},
    {0xDCB0, 0x0730},
    {0xDCB1, 0x0731},
    {0xDCB2, 0x0732},
    {0xDCB3, 0x0733},
    {0xDCB4, 0x0734},
    {0xDCB5, 0x0735},
    {0xDCB6, 0x0736},
    {0xDCB7, 0x0737},
    {0xDCB8, 0x0738},
    {0xDCB9, 0x0739},
    {0xDCBA, 0x073A},
    {0xDCBB, 0x073B},
    {0xDCBC, 0x073C},
    {0xDCBD, 0x073D},
    {0xDCBE, 0x073E},
    {0xDCBF, 0x073F},
    {0xDD80, 0x0740},
    {0xDD81, 0x0741},
    {0xDD82, 0x0742},
    {0xDD83, 0x0743},
    {0xDD84, 0x0744},
    {0xDD85, 0x0745},
    {0xDD86, 0x0746},
    {0xDD87, 0x0747},
    {0xDD88, 0x0748},
    {0xDD89, 0x0749},
    {0xDD8A, 0x074A},
    {0xDD8B, 0x074B},
    {0xDD8C, 0x074C},
    {0xDD8D, 0x074D},
    {0xDD8E, 0x074E},
    {0xDD8F, 0x074F},
    {0xDD90, 0x0750},
    {0xDD91, 0x0751},
    {0xDD92, 0x0752},
    {0xDD93, 0x0753},
    {0xDD94, 0x0754},
    {0xDD95, 0x0755},
    {0xDD96, 0x0756},
    {0xDD97, 0x0757},
    {0xDD98, 0x0758},
    {0xDD99, 0x0759},
    {0xDD9A, 0x075A},
    {0xDD9B, 0x075B},
    {0xDD9C, 0x075C},
    {0xDD9D, 0x075D},
    {0xDD9E, 0x075E},
    {0xDD9F, 0x075F},
    {0xDDA0, 0x0760},
    {0xDDA1, 0x0761},
    {0xDDA2, 0x0762},
    {0xDDA3, 0x0763},
    {0xDDA4, 0x0764},
    {0xDDA5, 0x0765},
    {0xDDA6, 0x0766},
    {0xDDA7, 0x0767},
    {0xDDA8, 0x0768},
    {0xDDA9, 0x0769},
    {0xDDAA, 0x076A},
    {0xDDAB, 0x076B},
    {0xDDAC, 0x076C},
    {0xDDAD, 0x076D},
    {0xDDAE, 0x076E},
    {0xDDAF, 0x076F},
    {0xDDB0, 0x0770},
    {0xDDB1, 0x0771},
    {0xDDB2, 0x0772},
    {0xDDB3, 0x0773},
    {0xDDB4, 0x0774},
    {0xDDB5, 0x0775},
    {0xDDB6, 0x0776},
    {0xDDB7, 0x0777},
    {0xDDB8, 0x0778},
    {0xDDB9, 0x0779},
    {0xDDBA, 0x077A},
    {0xDDBB, 0x077B},
    {0xDDBC, 0x077C},
    {0xDDBD, 0x077D},
    {0xDDBE, 0x077E},
    {0xDDBF, 0x077F},
    {0xDE80, 0x0780},
    {0xDE81, 0x0781},
    {0xDE82, 0x0782},
    {0xDE83, 0x0783},
    {0xDE84, 0x0784},
    {0xDE85, 0x0785},
    {0xDE86, 0x0786},
    {0xDE87, 0x0787},
    {0xDE88, 0x0788},
    {0xDE89, 0x0789},
    {0xDE8A, 0x078A},
    {0xDE8B, 0x078B},
    {0xDE8C, 0x078C},
    {0xDE8D, 0x078D},
    {0xDE8E, 0x078E},
    {0xDE8F, 0x078F},
    {0xDE90, 0x0790},
    {0xDE91, 0x0791},
    {0xDE92, 0x0792},
    {0xDE93, 0x0793},
    {0xDE94, 0x0794},
    {0xDE95, 0x0795},
    {0xDE96, 0x0796},
    {0xDE97, 0x0797},
    {0xDE98, 0x0798},
    {0xDE99, 0x0799},
    {0xDE9A, 0x079A},
    {0xDE9B, 0x079B},
    {0xDE9C, 0x079C},
    {0xDE9D, 0x079D},
    {0xDE9E, 0x079E},
    {0xDE9F, 0x079F},
    {0xDEA0, 0x07A0},
    {0xDEA1, 0x07A1},
    {0xDEA2, 0x07A2},
    {0xDEA3, 0x07A3},
    {0xDEA4, 0x07A4},
    {0xDEA5, 0x07A5},
    {0xDEA6, 0x07A6},
    {0xDEA7, 0x07A7},
    {0xDEA8, 0x07A8},
    {0xDEA9, 0x07A9},
    {0xDEAA, 0x07AA},
    {0xDEAB, 0x07AB},
    {0xDEAC, 0x07AC},
    {0xDEAD, 0x07AD},
    {0xDEAE, 0x07AE},
    {0xDEAF, 0x07AF},
    {0xDEB0, 0x07B0},
    {0xDEB1, 0x07B1},
    {0xDEB2, 0x07B2},
    {0xDEB3, 0x07B3},
    {0xDEB4, 0x07B4},
    {0xDEB5, 0x07B5},
    {0xDEB6, 0x07B6},
    {0xDEB7, 0x07B7},
    {0xDEB8, 0x07B8},
    {0xDEB9, 0x07B9},
    {0xDEBA, 0x07BA},
    {0xDEBB, 0x07BB},
    {0xDEBC, 0x07BC},
    {0xDEBD, 0x07BD},
    {0xDEBE, 0x07BE},
    {0xDEBF, 0x07BF},
    {0xDF80, 0x07C0},
    {0xDF81, 0x07C1},
    {0xDF82, 0x07C2},
    {0xDF83, 0x07C3},
    {0xDF84, 0x07C4},
    {0xDF85, 0x07C5},
    {0xDF86, 0x07C6},
    {0xDF87, 0x07C7},
    {0xDF88, 0x07C8},
    {0xDF89, 0x07C9},
    {0xDF8A, 0x07CA},
    {0xDF8B, 0x07CB},
    {0xDF8C, 0x07CC},
    {0xDF8D, 0x07CD},
    {0xDF8E, 0x07CE},
    {0xDF8F, 0x07CF},
    {0xDF90, 0x07D0},
    {0xDF91, 0x07D1},
    {0xDF92, 0x07D2},
    {0xDF93, 0x07D3},
    {0xDF94, 0x07D4},
    {0xDF95, 0x07D5},
    {0xDF96, 0x07D6},
    {0xDF97, 0x07D7},
    {0xDF98, 0x07D8},
    {0xDF99, 0x07D9},
    {0xDF9A, 0x07DA},
    {0xDF9B, 0x07DB},
    {0xDF9C, 0x07DC},
    {0xDF9D, 0x07DD},
    {0xDF9E, 0x07DE},
    {0xDF9F, 0x07DF},
    {0xDFA0, 0x07E0},
    {0xDFA1, 0x07E1},
    {0xDFA2, 0x07E2},
    {0xDFA3, 0x07E3},
    {0xDFA4, 0x07E4},
    {0xDFA5, 0x07E5},
    {0xDFA6, 0x07E6},
    {0xDFA7, 0x07E7},
    {0xDFA8, 0x07E8},
    {0xDFA9, 0x07E9},
    {0xDFAA, 0x07EA},
    {0xDFAB, 0x07EB},
    {0xDFAC, 0x07EC},
    {0xDFAD, 0x07ED},
    {0xDFAE, 0x07EE},
    {0xDFAF, 0x07EF},
    {0xDFB0, 0x07F0},
    {0xDFB1, 0x07F1},
    {0xDFB2, 0x07F2},
    {0xDFB3, 0x07F3},
    {0xDFB4, 0x07F4},
    {0xDFB5, 0x07F5},
    {0xDFB6, 0x07F6},
    {0xDFB7, 0x07F7},
    {0xDFB8, 0x07F8},
    {0xDFB9, 0x07F9},
    {0xDFBA, 0x07FA},
    {0xDFBB, 0x07FB},
    {0xDFBC, 0x07FC},
    {0xDFBD, 0x07FD},
    {0xDFBE, 0x07FE},
    {0xDFBF, 0x07FF},
    {0xFFFF, 0xFFFF}
};


static const HPDF_CidRange_Rec CMAP_ARRAY_UTF8[] = {
    {0x20, 0x7F, 0x20},
    {0xC280, 0xC2BF, 0x0080},
    {0xC380, 0xC3BF, 0x00C0},
    {0xC480, 0xC4BF, 0x0100},
    {0xC580, 0xC5BF, 0x0140},
    {0xC680, 0xC6BF, 0x0180},
    {0xC780, 0xC7BF, 0x01C0},
    {0xC880, 0xC8BF, 0x0200},
    {0xC980, 0xC9BF, 0x0240},
    {0xCA80, 0xCABF, 0x0280},
    {0xCB80, 0xCBBF, 0x02C0},
    {0xCC80, 0xCCBF, 0x0300},
    {0xCD80, 0xCDBF, 0x0340},
    {0xCE80, 0xCEBF, 0x0380},
    {0xCF80, 0xCFBF, 0x03C0},
    {0xD080, 0xD0BF, 0x0400},
    {0xD180, 0xD1BF, 0x0440},
    {0xD280, 0xD2BF, 0x0480},
    {0xD380, 0xD3BF, 0x04C0},
    {0xD480, 0xD4BF, 0x0500},
    {0xD580, 0xD5BF, 0x0540},
    {0xD680, 0xD6BF, 0x0580},
    {0xD780, 0xD7BF, 0x05C0},
    {0xD880, 0xD8BF, 0x0600},
    {0xD980, 0xD9BF, 0x0640},
    {0xDA80, 0xDABF, 0x0680},
    {0xDB80, 0xDBBF, 0x06C0},
    {0xDC80, 0xDCBF, 0x0700},
    {0xDD80, 0xDDBF, 0x0740},
    {0xDE80, 0xDEBF, 0x0780},
    {0xDF80, 0xDFBF, 0x07C0},
    {0xFFFF, 0xFFFF, 0}
};


static const HPDF_CidRange_Rec UTF8_NOTDEF_RANGE = {0x00, 0x1F, 1};


static HPDF_BOOL
UTF8_IsLeadByte  (HPDF_Encoder    encoder,
                     HPDF_BYTE       b);


static HPDF_BOOL
UTF8_IsTrialByte  (HPDF_Encoder    encoder,
                      HPDF_BYTE       b);


static HPDF_STATUS
UTF8_AddCodeSpaceRange (HPDF_Encoder    encoder);


static HPDF_STATUS
UTF8_Init  (HPDF_Encoder    encoder);


static HPDF_STATUS
UTF8_Init  (HPDF_Encoder    encoder);


/*--------------------------------------------------------------------------*/

static HPDF_BOOL
UTF8_IsLeadByte  (HPDF_Encoder    encoder,
                  HPDF_BYTE       b)
{
    return ((b >= 0xC2 && b <= 0xDF));
}


static HPDF_BOOL
UTF8_IsTrialByte  (HPDF_Encoder    encoder,
                   HPDF_BYTE       b)
{
    return (b >= 0x80 && b <= 0xBF);
}


static HPDF_STATUS
UTF8_AddCodeSpaceRange (HPDF_Encoder    encoder)
{
    HPDF_CidRange_Rec code_space_range1 = {0x00, 0x7F, 0};
    HPDF_CidRange_Rec code_space_range2 = {0xC280, 0xDFBF, 0};

    if (HPDF_CMapEncoder_AddCodeSpaceRange (encoder, code_space_range1)
                    != HPDF_OK)
        return encoder->error->error_no;

    if (HPDF_CMapEncoder_AddCodeSpaceRange (encoder, code_space_range2)
                    != HPDF_OK)
        return encoder->error->error_no;

    return HPDF_OK;
}


static HPDF_STATUS
UTF8_Init  (HPDF_Encoder  encoder)
{
    HPDF_CMapEncoderAttr attr;
    HPDF_STATUS ret;

    if ((ret = HPDF_CMapEncoder_InitAttr (encoder)) != HPDF_OK)
        return ret;

    attr = (HPDF_CMapEncoderAttr)encoder->attr;

    if (HPDF_CMapEncoder_AddCMap (encoder, CMAP_ARRAY_UTF8) != HPDF_OK)
        return encoder->error->error_no;

    if ((ret = UTF8_AddCodeSpaceRange (encoder)) != HPDF_OK)
        return ret;

    if (HPDF_CMapEncoder_AddNotDefRange (encoder, UTF8_NOTDEF_RANGE)
                != HPDF_OK)
        return encoder->error->error_no;

    HPDF_CMapEncoder_SetUnicodeArray (encoder, UTF8_UNICODE_ARRAY);

    attr->is_lead_byte_fn = UTF8_IsLeadByte;
    attr->is_trial_byte_fn = UTF8_IsTrialByte;

    HPDF_StrCpy (attr->registry, "Adobe", attr->registry +
                HPDF_LIMIT_MAX_NAME_LEN);
    HPDF_StrCpy (attr->ordering, "UTF-8", attr->ordering +
                HPDF_LIMIT_MAX_NAME_LEN);
    attr->suppliment = 0;
    attr->writing_mode = HPDF_WMODE_HORIZONTAL;
    
    /* Not sure about this
    attr->uid_offset = 0;
    attr->xuid[0] = 0;
    attr->xuid[1] = 0;
    attr->xuid[2] = 0;
    */

    encoder->type = HPDF_ENCODER_TYPE_DOUBLE_BYTE;

    return HPDF_OK;
}

/*--------------------------------------------------------------------------*/

HPDF_EXPORT(HPDF_STATUS)
HPDF_UseUTFEncodings   (HPDF_Doc   pdf)
{
    HPDF_Encoder encoder;
    HPDF_STATUS ret;

    if (!HPDF_HasDoc (pdf))
        return HPDF_INVALID_DOCUMENT;

    encoder = HPDF_CMapEncoder_New (pdf->mmgr,  "UTF-8",
                UTF8_Init);

    if ((ret = HPDF_Doc_RegisterEncoder (pdf, encoder)) != HPDF_OK)
        return ret;

    return HPDF_OK;
}
